<template>
    <div class="container" ref="toast" v-if="show">
        <div>
            {{text}}
        </div>
    </div>
</template>
<script>
export default {
    name: 'Toast',
    data() {
        return {
            text: '',
            duration: null,
            show: true,    
        }
    }
}
</script>
<style scoped>
    .container {
        position: fixed;
        top: calc(50% -20px);
        left: calc(50% - 50px);
        width: 100px;
        height: 40px;
        text-align: center;
        line-height: 40px;
        color: #fff;
        background-color: rgba(0, 0, 0, 0.8);
        border-radius: 10px;
        box-sizing: border-box;
    }
</style>